package com.epam.giorgadze.task1.entity;

import com.epam.giorgadze.task1.countries.Country;

/**
 * User: Luka
 * Date: 11.02.14
 * Time: 21:27
 */
public class Manufacturer {
    private String name;
    private Country country;
    private String email;
    private int phoneNumber;
    private String address;

    public Manufacturer() {
    }

    public boolean checkPhoneNumber(int d) {
        if (d >= 0) {
            return true;
        } else return false;
    }

    public Manufacturer(String name, String email, Country country, int phoneNumber, String address) {
        this.name = name;
        this.email = email;
        this.country = country;
        if (checkPhoneNumber(phoneNumber)) {
            this.phoneNumber = phoneNumber;
        } else this.phoneNumber = 0;
        this.address = address;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Country getCountry() {
        return country;
    }

    public void setCountry(Country country) {
        this.country = country;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public int getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(int phoneNumber) {
        if (checkPhoneNumber(phoneNumber)) {
            this.phoneNumber = phoneNumber;
        } else this.phoneNumber = 0;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
}
